{%extends '../tpl/admin-base.html'%}
{%block body%}
<div class="main">
    {%include '../tpl/aside-nav.html'%}
    <div class="aside-content">
        <div class="table-header">
            <a href="/admin/article/add" class="button-normal button-dark">发布文章</a>
        </div>
        {%if article%}
        <table class="article-table">
            <tr>
                <th>编号</th>
                <th>题目</th>
                <th>日期</th>
                <th>操作</th>
            </tr>
            {%for k in article%}
            <tr>
                <td>{{loop.index}}</td>
                <td><a target="_blank" href="/article/{{k._id}}.html">{{k.title}}</a></td>
                <td>{{k.addTime}}</td>
                <td><a class="js-delete" href="javascript:;" data-url="/delete/article/{{k._id}}">删除</a><a href="/admin/article/edit/{{k._id}}">编辑</a></td>
            </tr>
            {%endfor%}
        </table>
        {%else%}
        暂无数据
        {%endif%}

        {%include '../tpl/upage.html'%}
    </div>
</div>
{%endblock%}